<template>
  <div id="app">
      <el-container>
      <el-header>
          <div class="left">
               <img :src="image" width="40px" height="40px"/>
               <span style="margin-left:10px">供应商管理系统</span>
          </div>
           <div class="right">
                <div></div>
                <div>
                    <el-dropdown>
                        <i class="el-icon-setting" style="margin-right: 15px"></i>
                        <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item>退出登录</el-dropdown-item>
                            <el-dropdown-item>个人中心</el-dropdown-item>
                        </el-dropdown-menu>
                    </el-dropdown>
                    <span>王小虎</span>
                    <i class="el-icon-full-screen" style="margin-left:15px"></i>
                </div>
          </div>
      </el-header>
      <el-container>
          <el-aside width="200px">
              <left-menu/>
          </el-aside>
          <el-main>
              <Index ref="mainIndex"/>
         </el-main>
      </el-container>
       <el-footer></el-footer>
    </el-container> 
  </div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import Index from '@/components/index.vue';
import LeftMenu from "@/views/layout/left-menu.vue";
@Component({
  components: {
       Index,
       LeftMenu
  },
})
export default class App extends Vue {
    private image=require("@/assets/logo/logo.png");
    private isShowMain=false;
    public openPage(name:any,params:any){
         let mainIndexRef:any=this.$refs.mainIndex;
         mainIndexRef.addTab(name,params);
    }
    
    //打开新窗口
    public openWindowPage(name:any,params:any){
         let mainIndexRef:any=this.$refs.mainIndex;
         mainIndexRef.addTab(name,params);
    }
}
</script>
<style lang="less">
  #app {
       background-color: #f3f3f4;
        width: 100%;
       .el-table{
            font-size: 13px;
        }
       .el-menu{
          border-right: solid 1px #43436e;
       }
       background-color: #184875;
         .el-tabs__header{
               margin-bottom: 0px;
         }
      .el-header {
          padding: 0 0px;
          background-color: #4b5b70;
          color: #333;
          text-align: center;
          height: 60px!important;
          display: flex;
          justify-content: space-between;
          .left{
              width: 205px;
              display: flex;
              margin-left: 20px;
              align-items: center;
              color: white;
          }
          .right{
              flex: 1;
              align-items: center;
              display: flex;
              justify-content: space-between;
              div{
                   color: rgb(133, 133, 150);
              }
              span{
                   color: rgb(151, 151, 170);
              }
              >div:nth-child(1){
                 width: 100px;
              }
              >div:nth-child(2){
                  min-width: 200px;
                  height: 30px;
              }
          }
      }
      .el-footer{
          background-color: #3b4e68;
          color: #333;
          text-align: center;
          height: 5px!important;
        }
      .el-aside {
           color: #333;
           line-height: 200px;
           background-color: rgb(48, 65, 86);
      }
      .el-main {
          background-color: white;
          color: #333;
          padding:0px;
          margin-left: 5px;
          .mainIndex{
              margin-left: 5px;
              height: calc(100% - 2px);
              .el-tabs{
                  border: 1px solid rgb(48, 65, 86);
                  margin-top: 2px;
                  height: calc(100% - 8px);
                  width: calc(100% - 7px);
              }
          }
      }
      >.el-container {
          height: 100%;
          width:100%;
          >.el-container{
               height: calc(100% - 110px);
               margin-top: 5px;
               margin-bottom: 5px;
          }
      }
      .el-tabs{
          height: 100%;
          .el-tabs__content{
              height: calc(100% - 40px);
              .el-tab-pane{
                  height: 100%;
              }
          }
      }
      .el-tabs__item{
          font-size: 13px!important;
      }
      .el-icon-full-screen{
          cursor: pointer;
      }
  }
</style>
